Name | Type | Length | IsNullable | Collation |
SaleAmount | money | 8 | ||
OrderID | int | 4 | ||
CompanyName | nvarchar | 80 | SQL_Latin1_General_CP1_CI_AS | |
CompanyName | sysname | 80 | SQL_Latin1_General_CP1_CI_AS | |
ShippedDate | datetime | 8 |
create view "Sales Totals by Amount" AS
SELECT "Order Subtotals".Subtotal AS SaleAmount, Orders.OrderID, Customers.CompanyName, Orders.ShippedDate
FROM Customers INNER JOIN
(Orders INNER JOIN "Order Subtotals" ON Orders.OrderID = "Order Subtotals".OrderID)
ON Customers.CustomerID = Orders.CustomerID
WHERE ("Order Subtotals".Subtotal >2500) AND (Orders.ShippedDate BETWEEN '19970101' And '19971231')